package top.leix.springdemo.pojo;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;

/**
 * 排课表
 * @TableName classtable
 */
@TableName(value ="classtable")
@Data
public class Classtable implements Serializable {
    /**
     * 学期
     */
    @TableField(value = "semester")
    private String semester;

    /**
     * 教师名字
     */
    @TableField(value = "teacherName")
    private String teacherName;

    /**
     * 上课班级
     */
    @TableField(value = "classId")
    private Integer classId;

    /**
     * 周几
     */
    @TableField(value = "weekDay")
    private Integer weekDay;

    /**
     * 第几节
     */
    @TableField(value = "applySection")
    private String applySection;

    /**
     * 开始周
     */
    @TableField(value = "startWeek")
    private Integer startWeek;

    /**
     * 结束周
     */
    @TableField(value = "endWeek")
    private Integer endWeek;

    /**
     * 实验室编号
     */
    @TableField(value = "labID")
    private String labID;

    /**
     * 实验室类别
     */
    @TableField(value = "labType")
    private Object labType;

    /**
     * 创建时间
     */
    @TableField(value = "createTime")
    private Date createTime;

    /**
     * 更新时间
     */
    @TableField(value = "updateTime")
    private Date updateTime;

    /**
     * 是否删除
     */
    @TableField(value = "isDelete")
    private Integer isDelete;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Classtable other = (Classtable) that;
        return (this.getSemester() == null ? other.getSemester() == null : this.getSemester().equals(other.getSemester()))
            && (this.getTeacherName() == null ? other.getTeacherName() == null : this.getTeacherName().equals(other.getTeacherName()))
            && (this.getClassId() == null ? other.getClassId() == null : this.getClassId().equals(other.getClassId()))
            && (this.getWeekDay() == null ? other.getWeekDay() == null : this.getWeekDay().equals(other.getWeekDay()))
            && (this.getApplySection() == null ? other.getApplySection() == null : this.getApplySection().equals(other.getApplySection()))
            && (this.getStartWeek() == null ? other.getStartWeek() == null : this.getStartWeek().equals(other.getStartWeek()))
            && (this.getEndWeek() == null ? other.getEndWeek() == null : this.getEndWeek().equals(other.getEndWeek()))
            && (this.getLabID() == null ? other.getLabID() == null : this.getLabID().equals(other.getLabID()))
            && (this.getLabType() == null ? other.getLabType() == null : this.getLabType().equals(other.getLabType()))
            && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
            && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()))
            && (this.getIsDelete() == null ? other.getIsDelete() == null : this.getIsDelete().equals(other.getIsDelete()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getSemester() == null) ? 0 : getSemester().hashCode());
        result = prime * result + ((getTeacherName() == null) ? 0 : getTeacherName().hashCode());
        result = prime * result + ((getClassId() == null) ? 0 : getClassId().hashCode());
        result = prime * result + ((getWeekDay() == null) ? 0 : getWeekDay().hashCode());
        result = prime * result + ((getApplySection() == null) ? 0 : getApplySection().hashCode());
        result = prime * result + ((getStartWeek() == null) ? 0 : getStartWeek().hashCode());
        result = prime * result + ((getEndWeek() == null) ? 0 : getEndWeek().hashCode());
        result = prime * result + ((getLabID() == null) ? 0 : getLabID().hashCode());
        result = prime * result + ((getLabType() == null) ? 0 : getLabType().hashCode());
        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
        result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
        result = prime * result + ((getIsDelete() == null) ? 0 : getIsDelete().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", semester=").append(semester);
        sb.append(", teacherName=").append(teacherName);
        sb.append(", classId=").append(classId);
        sb.append(", weekDay=").append(weekDay);
        sb.append(", applySection=").append(applySection);
        sb.append(", startWeek=").append(startWeek);
        sb.append(", endWeek=").append(endWeek);
        sb.append(", labID=").append(labID);
        sb.append(", labType=").append(labType);
        sb.append(", createTime=").append(createTime);
        sb.append(", updateTime=").append(updateTime);
        sb.append(", isDelete=").append(isDelete);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}